<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SoupServer</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="libsoup Reference Manual">
<link rel="up" href="ch02.html" title="Core API">
<link rel="prev" href="SoupMultipart.html" title="SoupMultipart">
<link rel="next" href="SoupSession.html" title="SoupSession">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="SoupMultipart.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">libsoup Reference Manual</th>
<td><a accesskey="n" href="SoupSession.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#SoupServer.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#SoupServer.description" class="shortcut">Description</a>
                   | 
                  <a href="#SoupServer.object-hierarchy" class="shortcut">Object Hierarchy</a>
                   | 
                  <a href="#SoupServer.properties" class="shortcut">Properties</a>
                   | 
                  <a href="#SoupServer.signals" class="shortcut">Signals</a>
</td></tr>
</table>
<div class="refentry">
<a name="SoupServer"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="SoupServer.top_of_page"></a>SoupServer</span></h2>
<p>SoupServer — HTTP server</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="SoupServer.synopsis"></a><h2>Synopsis</h2>
<a name="SoupClientContext"></a><pre class="synopsis">
#include &lt;libsoup/soup.h&gt;

                    <a class="link" href="SoupServer.html#SoupServer-struct" title="SoupServer">SoupServer</a>;
<a class="link" href="SoupServer.html" title="SoupServer"><span class="returnvalue">SoupServer</span></a> *        <a class="link" href="SoupServer.html#soup-server-new" title="soup_server_new ()">soup_server_new</a>                     (<em class="parameter"><code>const <span class="type">char</span> *optname1</code></em>,
                                                         <em class="parameter"><code>...</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="SoupServer.html#soup-server-is-https" title="soup_server_is_https ()">soup_server_is_https</a>                (<em class="parameter"><code><a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a> *server</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               <a class="link" href="SoupServer.html#soup-server-get-port" title="soup_server_get_port ()">soup_server_get_port</a>                (<em class="parameter"><code><a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a> *server</code></em>);
<a class="link" href="SoupSocket.html" title="SoupSocket"><span class="returnvalue">SoupSocket</span></a> *        <a class="link" href="SoupServer.html#soup-server-get-listener" title="soup_server_get_listener ()">soup_server_get_listener</a>            (<em class="parameter"><code><a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a> *server</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupServer.html#soup-server-run" title="soup_server_run ()">soup_server_run</a>                     (<em class="parameter"><code><a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a> *server</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupServer.html#soup-server-run-async" title="soup_server_run_async ()">soup_server_run_async</a>               (<em class="parameter"><code><a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a> *server</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupServer.html#soup-server-quit" title="soup_server_quit ()">soup_server_quit</a>                    (<em class="parameter"><code><a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a> *server</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupServer.html#soup-server-disconnect" title="soup_server_disconnect ()">soup_server_disconnect</a>              (<em class="parameter"><code><a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a> *server</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><span class="returnvalue">GMainContext</span></a> *      <a class="link" href="SoupServer.html#soup-server-get-async-context" title="soup_server_get_async_context ()">soup_server_get_async_context</a>       (<em class="parameter"><code><a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a> *server</code></em>);

<span class="returnvalue">void</span>                (<a class="link" href="SoupServer.html#SoupServerCallback" title="SoupServerCallback ()">*SoupServerCallback</a>)               (<em class="parameter"><code><a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a> *server</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a> *msg</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> *query</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupServer.html#SoupClientContext"><span class="type">SoupClientContext</span></a> *client</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupServer.html#soup-server-add-handler" title="soup_server_add_handler ()">soup_server_add_handler</a>             (<em class="parameter"><code><a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a> *server</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupServer.html#SoupServerCallback" title="SoupServerCallback ()"><span class="type">SoupServerCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupServer.html#soup-server-remove-handler" title="soup_server_remove_handler ()">soup_server_remove_handler</a>          (<em class="parameter"><code><a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a> *server</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *path</code></em>);

typedef             <a class="link" href="SoupServer.html#SoupClientContext">SoupClientContext</a>;
<a class="link" href="SoupSocket.html" title="SoupSocket"><span class="returnvalue">SoupSocket</span></a> *        <a class="link" href="SoupServer.html#soup-client-context-get-socket" title="soup_client_context_get_socket ()">soup_client_context_get_socket</a>      (<em class="parameter"><code><a class="link" href="SoupServer.html#SoupClientContext"><span class="type">SoupClientContext</span></a> *client</code></em>);
<a class="link" href="SoupAddress.html" title="SoupAddress"><span class="returnvalue">SoupAddress</span></a> *       <a class="link" href="SoupServer.html#soup-client-context-get-address" title="soup_client_context_get_address ()">soup_client_context_get_address</a>     (<em class="parameter"><code><a class="link" href="SoupServer.html#SoupClientContext"><span class="type">SoupClientContext</span></a> *client</code></em>);
const <span class="returnvalue">char</span> *        <a class="link" href="SoupServer.html#soup-client-context-get-host" title="soup_client_context_get_host ()">soup_client_context_get_host</a>        (<em class="parameter"><code><a class="link" href="SoupServer.html#SoupClientContext"><span class="type">SoupClientContext</span></a> *client</code></em>);
<a class="link" href="SoupAuthDomain.html" title="SoupAuthDomain"><span class="returnvalue">SoupAuthDomain</span></a> *    <a class="link" href="SoupServer.html#soup-client-context-get-auth-domain" title="soup_client_context_get_auth_domain ()">soup_client_context_get_auth_domain</a> (<em class="parameter"><code><a class="link" href="SoupServer.html#SoupClientContext"><span class="type">SoupClientContext</span></a> *client</code></em>);
const <span class="returnvalue">char</span> *        <a class="link" href="SoupServer.html#soup-client-context-get-auth-user" title="soup_client_context_get_auth_user ()">soup_client_context_get_auth_user</a>   (<em class="parameter"><code><a class="link" href="SoupServer.html#SoupClientContext"><span class="type">SoupClientContext</span></a> *client</code></em>);

<span class="returnvalue">void</span>                <a class="link" href="SoupServer.html#soup-server-add-auth-domain" title="soup_server_add_auth_domain ()">soup_server_add_auth_domain</a>         (<em class="parameter"><code><a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a> *server</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupAuthDomain.html" title="SoupAuthDomain"><span class="type">SoupAuthDomain</span></a> *auth_domain</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupServer.html#soup-server-remove-auth-domain" title="soup_server_remove_auth_domain ()">soup_server_remove_auth_domain</a>      (<em class="parameter"><code><a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a> *server</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupAuthDomain.html" title="SoupAuthDomain"><span class="type">SoupAuthDomain</span></a> *auth_domain</code></em>);

<span class="returnvalue">void</span>                <a class="link" href="SoupServer.html#soup-server-pause-message" title="soup_server_pause_message ()">soup_server_pause_message</a>           (<em class="parameter"><code><a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a> *server</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a> *msg</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupServer.html#soup-server-unpause-message" title="soup_server_unpause_message ()">soup_server_unpause_message</a>         (<em class="parameter"><code><a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a> *server</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a> *msg</code></em>);

#define             <a class="link" href="SoupServer.html#SOUP-SERVER-PORT:CAPS" title="SOUP_SERVER_PORT">SOUP_SERVER_PORT</a>
#define             <a class="link" href="SoupServer.html#SOUP-SERVER-INTERFACE:CAPS" title="SOUP_SERVER_INTERFACE">SOUP_SERVER_INTERFACE</a>
#define             <a class="link" href="SoupServer.html#SOUP-SERVER-SSL-CERT-FILE:CAPS" title="SOUP_SERVER_SSL_CERT_FILE">SOUP_SERVER_SSL_CERT_FILE</a>
#define             <a class="link" href="SoupServer.html#SOUP-SERVER-SSL-KEY-FILE:CAPS" title="SOUP_SERVER_SSL_KEY_FILE">SOUP_SERVER_SSL_KEY_FILE</a>
#define             <a class="link" href="SoupServer.html#SOUP-SERVER-TLS-CERTIFICATE:CAPS" title="SOUP_SERVER_TLS_CERTIFICATE">SOUP_SERVER_TLS_CERTIFICATE</a>
#define             <a class="link" href="SoupServer.html#SOUP-SERVER-ASYNC-CONTEXT:CAPS" title="SOUP_SERVER_ASYNC_CONTEXT">SOUP_SERVER_ASYNC_CONTEXT</a>
#define             <a class="link" href="SoupServer.html#SOUP-SERVER-RAW-PATHS:CAPS" title="SOUP_SERVER_RAW_PATHS">SOUP_SERVER_RAW_PATHS</a>
#define             <a class="link" href="SoupServer.html#SOUP-SERVER-SERVER-HEADER:CAPS" title="SOUP_SERVER_SERVER_HEADER">SOUP_SERVER_SERVER_HEADER</a>
</pre>
</div>
<div class="refsect1">
<a name="SoupServer.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
   +----SoupServer
</pre>
<pre class="synopsis">
  GBoxed
   +----SoupClientContext
</pre>
</div>
<div class="refsect1">
<a name="SoupServer.properties"></a><h2>Properties</h2>
<pre class="synopsis">
  "<a class="link" href="SoupServer.html#SoupServer--async-context" title='The "async-context" property'>async-context</a>"            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>              : Read / Write / Construct Only
  "<a class="link" href="SoupServer.html#SoupServer--interface" title='The "interface" property'>interface</a>"                <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a>*          : Read / Write / Construct Only
  "<a class="link" href="SoupServer.html#SoupServer--port" title='The "port" property'>port</a>"                     <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read / Write / Construct Only
  "<a class="link" href="SoupServer.html#SoupServer--raw-paths" title='The "raw-paths" property'>raw-paths</a>"                <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct Only
  "<a class="link" href="SoupServer.html#SoupServer--server-header" title='The "server-header" property'>server-header</a>"            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct
  "<a class="link" href="SoupServer.html#SoupServer--ssl-cert-file" title='The "ssl-cert-file" property'>ssl-cert-file</a>"            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct Only
  "<a class="link" href="SoupServer.html#SoupServer--ssl-key-file" title='The "ssl-key-file" property'>ssl-key-file</a>"             <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct Only
  "<a class="link" href="SoupServer.html#SoupServer--tls-certificate" title='The "tls-certificate" property'>tls-certificate</a>"          <a href="http://library.gnome.org/devel/gio/unstable/GTlsCertificate.html"><span class="type">GTlsCertificate</span></a>*      : Read / Write / Construct Only
</pre>
</div>
<div class="refsect1">
<a name="SoupServer.signals"></a><h2>Signals</h2>
<pre class="synopsis">
  "<a class="link" href="SoupServer.html#SoupServer-request-aborted" title='The "request-aborted" signal'>request-aborted</a>"                                : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a>
  "<a class="link" href="SoupServer.html#SoupServer-request-finished" title='The "request-finished" signal'>request-finished</a>"                               : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a>
  "<a class="link" href="SoupServer.html#SoupServer-request-read" title='The "request-read" signal'>request-read</a>"                                   : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a>
  "<a class="link" href="SoupServer.html#SoupServer-request-started" title='The "request-started" signal'>request-started</a>"                                : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a>
</pre>
</div>
<div class="refsect1">
<a name="SoupServer.description"></a><h2>Description</h2>
<p>
<a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a> implements a simple HTTP server.
</p>
<p>
To begin, create a server using <a class="link" href="SoupServer.html#soup-server-new" title="soup_server_new ()"><code class="function">soup_server_new()</code></a>. Add at least one
handler by calling <a class="link" href="SoupServer.html#soup-server-add-handler" title="soup_server_add_handler ()"><code class="function">soup_server_add_handler()</code></a>; the handler will be
called to process any requests underneath the path passed to
<a class="link" href="SoupServer.html#soup-server-add-handler" title="soup_server_add_handler ()"><code class="function">soup_server_add_handler()</code></a>. (If you want all requests to go to the
same handler, just pass "/" (or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>) for the path.) Any request
that does not match any handler will automatically be returned to
the client with a 404 (Not Found) status.
</p>
<p>
If you want to handle the special "*" URI (eg, "OPTIONS *"), you
must explicitly register a handler for "*"; the default handler
will not be used for that case.
</p>
<p>
To add authentication to some or all paths, create an appropriate
<a class="link" href="SoupAuthDomain.html" title="SoupAuthDomain"><span class="type">SoupAuthDomain</span></a> (qv), and add it to the server via
<a class="link" href="SoupServer.html#soup-server-add-auth-domain" title="soup_server_add_auth_domain ()"><code class="function">soup_server_add_auth_domain()</code></a>. (As with handlers, you must
explicitly add "*" to an auth domain if you want it to be covered.)
</p>
<p>
Additional processing options are available via <a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a>'s
signals; Connect to <a class="link" href="SoupServer.html#SoupServer-request-started" title='The "request-started" signal'><span class="type">"request-started"</span></a> to be notified
every time a new request is being processed. (This gives you a
chance to connect to the <a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a> "got-" signals in case you
want to do processing before the body has been fully read.)
</p>
<p>
Once the server is set up, start it processing connections by
calling <a class="link" href="SoupServer.html#soup-server-run-async" title="soup_server_run_async ()"><code class="function">soup_server_run_async()</code></a> or <a class="link" href="SoupServer.html#soup-server-run" title="soup_server_run ()"><code class="function">soup_server_run()</code></a>. <a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a>
runs via the glib main loop; if you need to have a server that runs
in another thread (or merely isn't bound to the default main loop),
create a <a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> for it to use, and set that via the
<a class="link" href="SoupServer.html#SOUP-SERVER-ASYNC-CONTEXT:CAPS" title="SOUP_SERVER_ASYNC_CONTEXT"><span class="type">SOUP_SERVER_ASYNC_CONTEXT</span></a> property.
</p>
</div>
<div class="refsect1">
<a name="SoupServer.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="SoupServer-struct"></a><h3>SoupServer</h3>
<pre class="programlisting">typedef struct _SoupServer SoupServer;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-server-new"></a><h3>soup_server_new ()</h3>
<pre class="programlisting"><a class="link" href="SoupServer.html" title="SoupServer"><span class="returnvalue">SoupServer</span></a> *        soup_server_new                     (<em class="parameter"><code>const <span class="type">char</span> *optname1</code></em>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<p>
Creates a new <a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>optname1</code></em> :</span></p></td>
<td>name of first property to set</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>value of <em class="parameter"><code>optname1</code></em>, followed by additional property/value pairs</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-server-is-https"></a><h3>soup_server_is_https ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            soup_server_is_https                (<em class="parameter"><code><a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a> *server</code></em>);</pre>
<p>
Checks whether <em class="parameter"><code>server</code></em> is running plain http or https.
</p>
<p>
In order for a server to run https, you must set the
<a class="link" href="SoupServer.html#SOUP-SERVER-SSL-CERT-FILE:CAPS" title="SOUP_SERVER_SSL_CERT_FILE"><code class="literal">SOUP_SERVER_SSL_CERT_FILE</code></a> and <a class="link" href="SoupServer.html#SOUP-SERVER-SSL-KEY-FILE:CAPS" title="SOUP_SERVER_SSL_KEY_FILE"><code class="literal">SOUP_SERVER_SSL_KEY_FILE</code></a> properties
to provide it with an SSL certificate to use.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>server</code></em> :</span></p></td>
<td>a <a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>server</code></em> is serving https.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-server-get-port"></a><h3>soup_server_get_port ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               soup_server_get_port                (<em class="parameter"><code><a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a> *server</code></em>);</pre>
<p>
Gets the TCP port that <em class="parameter"><code>server</code></em> is listening on. This is most useful
when you did not request a specific port (or explicitly requested
<a class="link" href="SoupAddress.html#SOUP-ADDRESS-ANY-PORT:CAPS" title="SOUP_ADDRESS_ANY_PORT"><code class="literal">SOUP_ADDRESS_ANY_PORT</code></a>).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>server</code></em> :</span></p></td>
<td>a <a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the port <em class="parameter"><code>server</code></em> is listening on.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-server-get-listener"></a><h3>soup_server_get_listener ()</h3>
<pre class="programlisting"><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="returnvalue">SoupSocket</span></a> *        soup_server_get_listener            (<em class="parameter"><code><a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a> *server</code></em>);</pre>
<p>
Gets <em class="parameter"><code>server</code></em>'s listening socket. You should treat this as
read-only; writing to it or modifiying it may cause <em class="parameter"><code>server</code></em> to
malfunction.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>server</code></em> :</span></p></td>
<td>a <a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the listening socket. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-server-run"></a><h3>soup_server_run ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_server_run                     (<em class="parameter"><code><a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a> *server</code></em>);</pre>
<p>
Starts <em class="parameter"><code>server</code></em>, causing it to listen for and process incoming
connections. Unlike <a class="link" href="SoupServer.html#soup-server-run-async" title="soup_server_run_async ()"><code class="function">soup_server_run_async()</code></a>, this creates a
<a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainLoop"><span class="type">GMainLoop</span></a> and runs it, and it will not return until someone calls
<a class="link" href="SoupServer.html#soup-server-quit" title="soup_server_quit ()"><code class="function">soup_server_quit()</code></a> to stop the server.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>server</code></em> :</span></p></td>
<td>a <a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-server-run-async"></a><h3>soup_server_run_async ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_server_run_async               (<em class="parameter"><code><a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a> *server</code></em>);</pre>
<p>
Starts <em class="parameter"><code>server</code></em>, causing it to listen for and process incoming
connections.
</p>
<p>
The server actually runs in <em class="parameter"><code>server</code></em>'s <a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a>. It will not
actually perform any processing unless the appropriate main loop is
running. In the simple case where you did not set the server's
<a class="link" href="SoupServer.html#SOUP-SERVER-ASYNC-CONTEXT:CAPS" title="SOUP_SERVER_ASYNC_CONTEXT"><code class="literal">SOUP_SERVER_ASYNC_CONTEXT</code></a> property, this means the server will run
whenever the glib main loop is running.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>server</code></em> :</span></p></td>
<td>a <a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-server-quit"></a><h3>soup_server_quit ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_server_quit                    (<em class="parameter"><code><a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a> *server</code></em>);</pre>
<p>
Stops processing for <em class="parameter"><code>server</code></em>. Call this to clean up after
<a class="link" href="SoupServer.html#soup-server-run-async" title="soup_server_run_async ()"><code class="function">soup_server_run_async()</code></a>, or to terminate a call to <a class="link" href="SoupServer.html#soup-server-run" title="soup_server_run ()"><code class="function">soup_server_run()</code></a>.
</p>
<p>
<em class="parameter"><code>server</code></em> is still in a working state after this call; you can start
and stop a server as many times as you want.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>server</code></em> :</span></p></td>
<td>a <a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-server-disconnect"></a><h3>soup_server_disconnect ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_server_disconnect              (<em class="parameter"><code><a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a> *server</code></em>);</pre>
<p>
Stops processing for <em class="parameter"><code>server</code></em> and closes its socket. This implies
the effects of <a class="link" href="SoupServer.html#soup-server-quit" title="soup_server_quit ()"><code class="function">soup_server_quit()</code></a>, but additionally closes the
listening socket.  Note that messages currently in progress will
continue to be handled, if the main loop associated with the
server is resumed or kept running.
</p>
<p>
After calling this function, <em class="parameter"><code>server</code></em> is no longer functional, so it
has nearly the same effect as destroying <em class="parameter"><code>server</code></em> entirely. The
function is thus useful mainly for language bindings without
explicit control over object lifetime.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>server</code></em> :</span></p></td>
<td>a <a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-server-get-async-context"></a><h3>soup_server_get_async_context ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><span class="returnvalue">GMainContext</span></a> *      soup_server_get_async_context       (<em class="parameter"><code><a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a> *server</code></em>);</pre>
<p>
Gets <em class="parameter"><code>server</code></em>'s async_context. This does not add a ref to the
context, so you will need to ref it yourself if you want it to
outlive its server.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>server</code></em> :</span></p></td>
<td>a <a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<em class="parameter"><code>server</code></em>'s <a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a>, which may be <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="SoupServerCallback"></a><h3>SoupServerCallback ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*SoupServerCallback)               (<em class="parameter"><code><a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a> *server</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a> *msg</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> *query</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupServer.html#SoupClientContext"><span class="type">SoupClientContext</span></a> *client</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
A callback used to handle requests to a <a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a>. The callback
will be invoked after receiving the request body; <em class="parameter"><code>msg</code></em>'s
<a class="link" href="SoupMessage.html#SoupMessage--method" title='The "method" property'><span class="type">"method"</span></a>, <a class="link" href="SoupMessage.html#SoupMessage--request-headers" title='The "request-headers" property'><span class="type">"request_headers"</span></a>, and
<a class="link" href="SoupMessage.html#SoupMessage--request-body" title='The "request-body" property'><span class="type">"request_body"</span></a> fields will be filled in.
</p>
<p>
<em class="parameter"><code>path</code></em> and <em class="parameter"><code>query</code></em> contain the likewise-named components of the
Request-URI, subject to certain assumptions. By default,
<a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a> decodes all percent-encoding in the URI path, such that
"/foo%2Fbar" is treated the same as "/foo/bar". If your
server is serving resources in some non-POSIX-filesystem namespace,
you may want to distinguish those as two distinct paths. In that
case, you can set the <a class="link" href="SoupServer.html#SOUP-SERVER-RAW-PATHS:CAPS" title="SOUP_SERVER_RAW_PATHS"><code class="literal">SOUP_SERVER_RAW_PATHS</code></a> property when creating
the <a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a>, and it will leave those characters undecoded. (You
may want to call <a class="link" href="SoupURI.html#soup-uri-normalize" title="soup_uri_normalize ()"><code class="function">soup_uri_normalize()</code></a> to decode any percent-encoded
characters that you aren't handling specially.)
</p>
<p>
<em class="parameter"><code>query</code></em> contains the query component of the Request-URI parsed
according to the rules for HTML form handling. Although this is the
only commonly-used query string format in HTTP, there is nothing
that actually requires that HTTP URIs use that format; if your
server needs to use some other format, you can just ignore <em class="parameter"><code>query</code></em>,
and call <a class="link" href="SoupMessage.html#soup-message-get-uri" title="soup_message_get_uri ()"><code class="function">soup_message_get_uri()</code></a> and parse the URI's query field
yourself.
</p>
<p>
After determining what to do with the request, the callback must at
a minimum call <a class="link" href="SoupMessage.html#soup-message-set-status" title="soup_message_set_status ()"><code class="function">soup_message_set_status()</code></a> (or
<a class="link" href="SoupMessage.html#soup-message-set-status-full" title="soup_message_set_status_full ()"><code class="function">soup_message_set_status_full()</code></a>) on <em class="parameter"><code>msg</code></em> to set the response status
code. Additionally, it may set response headers and/or fill in the
response body.
</p>
<p>
If the callback cannot fully fill in the response before returning
(eg, if it needs to wait for information from a database, or
another network server), it should call <a class="link" href="SoupServer.html#soup-server-pause-message" title="soup_server_pause_message ()"><code class="function">soup_server_pause_message()</code></a>
to tell <a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a> to not send the response right away. When the
response is ready, call <a class="link" href="SoupServer.html#soup-server-unpause-message" title="soup_server_unpause_message ()"><code class="function">soup_server_unpause_message()</code></a> to cause it
to be sent.
</p>
<p>
To send the response body a bit at a time using "chunked" encoding,
first call <a class="link" href="SoupMessageHeaders.html#soup-message-headers-set-encoding" title="soup_message_headers_set_encoding ()"><code class="function">soup_message_headers_set_encoding()</code></a> to set
<a class="link" href="SoupMessageHeaders.html#SOUP-ENCODING-CHUNKED:CAPS"><code class="literal">SOUP_ENCODING_CHUNKED</code></a> on the <a class="link" href="SoupMessage.html#SoupMessage--response-headers" title='The "response-headers" property'><span class="type">"response_headers"</span></a>. Then call
<a class="link" href="SoupMessageBody.html#soup-message-body-append" title="soup_message_body_append ()"><code class="function">soup_message_body_append()</code></a> (or <a class="link" href="SoupMessageBody.html#soup-message-body-append-buffer" title="soup_message_body_append_buffer ()"><code class="function">soup_message_body_append_buffer()</code></a>)
to append each chunk as it becomes ready, and
<a class="link" href="SoupServer.html#soup-server-unpause-message" title="soup_server_unpause_message ()"><code class="function">soup_server_unpause_message()</code></a> to make sure it's running. (The
server will automatically pause the message if it is using chunked
encoding but no more chunks are available.) When you are done, call
<a class="link" href="SoupMessageBody.html#soup-message-body-complete" title="soup_message_body_complete ()"><code class="function">soup_message_body_complete()</code></a> to indicate that no more chunks are
coming.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>server</code></em> :</span></p></td>
<td>the <a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td>
<td>the message being processed</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
<td>the path component of <em class="parameter"><code>msg</code></em>'s Request-URI</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>query</code></em> :</span></p></td>
<td>the parsed query
component of <em class="parameter"><code>msg</code></em>'s Request-URI. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8 utf8][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
<td>additional contextual information about the client</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>the data passed to <em class="parameter"><code>soup_server_add_handler</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-server-add-handler"></a><h3>soup_server_add_handler ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_server_add_handler             (<em class="parameter"><code><a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a> *server</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupServer.html#SoupServerCallback" title="SoupServerCallback ()"><span class="type">SoupServerCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy</code></em>);</pre>
<p>
Adds a handler to <em class="parameter"><code>server</code></em> for requests under <em class="parameter"><code>path</code></em>. See the
documentation for <a class="link" href="SoupServer.html#SoupServerCallback" title="SoupServerCallback ()"><span class="type">SoupServerCallback</span></a> for information about
how callbacks should behave.
</p>
<p>
If <em class="parameter"><code>path</code></em> is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> or "/", then this will be the default handler for
all requests that don't have a more specific handler. Note though
that if you want to handle requests to the special "*" URI, you
must explicitly register a handler for "*"; the default handler
will not be used for that case.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>server</code></em> :</span></p></td>
<td>a <a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
<td>the toplevel path for the handler. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>callback to invoke for requests under <em class="parameter"><code>path</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>data for <em class="parameter"><code>callback</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>destroy</code></em> :</span></p></td>
<td>destroy notifier to free <em class="parameter"><code>user_data</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-server-remove-handler"></a><h3>soup_server_remove_handler ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_server_remove_handler          (<em class="parameter"><code><a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a> *server</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *path</code></em>);</pre>
<p>
Removes the handler registered at <em class="parameter"><code>path</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>server</code></em> :</span></p></td>
<td>a <a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
<td>the toplevel path for the handler</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="SoupClientContext"></a><h3>SoupClientContext</h3>
<pre class="programlisting">typedef struct SoupClientContext SoupClientContext;
</pre>
<p>
A <a class="link" href="SoupServer.html#SoupClientContext"><span class="type">SoupClientContext</span></a> provides additional information about the
client making a particular request. In particular, you can use
<a class="link" href="SoupServer.html#soup-client-context-get-auth-domain" title="soup_client_context_get_auth_domain ()"><code class="function">soup_client_context_get_auth_domain()</code></a> and
<a class="link" href="SoupServer.html#soup-client-context-get-auth-user" title="soup_client_context_get_auth_user ()"><code class="function">soup_client_context_get_auth_user()</code></a> to determine if HTTP
authentication was used successfully.
</p>
<p>
<a class="link" href="SoupServer.html#soup-client-context-get-address" title="soup_client_context_get_address ()"><code class="function">soup_client_context_get_address()</code></a> and/or
<a class="link" href="SoupServer.html#soup-client-context-get-host" title="soup_client_context_get_host ()"><code class="function">soup_client_context_get_host()</code></a> can be used to get information for
logging or debugging purposes. <a class="link" href="SoupServer.html#soup-client-context-get-socket" title="soup_client_context_get_socket ()"><code class="function">soup_client_context_get_socket()</code></a> may
also be of use in some situations (eg, tracking when multiple
requests are made on the same connection).
</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-client-context-get-socket"></a><h3>soup_client_context_get_socket ()</h3>
<pre class="programlisting"><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="returnvalue">SoupSocket</span></a> *        soup_client_context_get_socket      (<em class="parameter"><code><a class="link" href="SoupServer.html#SoupClientContext"><span class="type">SoupClientContext</span></a> *client</code></em>);</pre>
<p>
Retrieves the <a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> that <em class="parameter"><code>client</code></em> is associated with.
</p>
<p>
If you are using this method to observe when multiple requests are
made on the same persistent HTTP connection (eg, as the ntlm-test
test program does), you will need to pay attention to socket
destruction as well (either by using weak references, or by
connecting to the <a class="link" href="SoupSocket.html#SoupSocket-disconnected" title='The "disconnected" signal'><span class="type">"disconnected"</span></a> signal), so that you do
not get fooled when the allocator reuses the memory address of a
previously-destroyed socket to represent a new socket.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
<td>a <a class="link" href="SoupServer.html#SoupClientContext"><span class="type">SoupClientContext</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the <a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> that <em class="parameter"><code>client</code></em> is
associated with. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-client-context-get-address"></a><h3>soup_client_context_get_address ()</h3>
<pre class="programlisting"><a class="link" href="SoupAddress.html" title="SoupAddress"><span class="returnvalue">SoupAddress</span></a> *       soup_client_context_get_address     (<em class="parameter"><code><a class="link" href="SoupServer.html#SoupClientContext"><span class="type">SoupClientContext</span></a> *client</code></em>);</pre>
<p>
Retrieves the <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> associated with the remote end
of a connection.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
<td>a <a class="link" href="SoupServer.html#SoupClientContext"><span class="type">SoupClientContext</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> associated with the
remote end of a connection. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-client-context-get-host"></a><h3>soup_client_context_get_host ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *        soup_client_context_get_host        (<em class="parameter"><code><a class="link" href="SoupServer.html#SoupClientContext"><span class="type">SoupClientContext</span></a> *client</code></em>);</pre>
<p>
Retrieves the IP address associated with the remote end of a
connection. (If you want the actual hostname, you'll have to call
<a class="link" href="SoupServer.html#soup-client-context-get-address" title="soup_client_context_get_address ()"><code class="function">soup_client_context_get_address()</code></a> and then call the appropriate
<a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> method to resolve it.)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
<td>a <a class="link" href="SoupServer.html#SoupClientContext"><span class="type">SoupClientContext</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the IP address associated with the remote end of a
connection.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-client-context-get-auth-domain"></a><h3>soup_client_context_get_auth_domain ()</h3>
<pre class="programlisting"><a class="link" href="SoupAuthDomain.html" title="SoupAuthDomain"><span class="returnvalue">SoupAuthDomain</span></a> *    soup_client_context_get_auth_domain (<em class="parameter"><code><a class="link" href="SoupServer.html#SoupClientContext"><span class="type">SoupClientContext</span></a> *client</code></em>);</pre>
<p>
Checks whether the request associated with <em class="parameter"><code>client</code></em> has been
authenticated, and if so returns the <a class="link" href="SoupAuthDomain.html" title="SoupAuthDomain"><span class="type">SoupAuthDomain</span></a> that
authenticated it.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
<td>a <a class="link" href="SoupServer.html#SoupClientContext"><span class="type">SoupClientContext</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="SoupAuthDomain.html" title="SoupAuthDomain"><span class="type">SoupAuthDomain</span></a>, or
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the request was not authenticated. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-client-context-get-auth-user"></a><h3>soup_client_context_get_auth_user ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *        soup_client_context_get_auth_user   (<em class="parameter"><code><a class="link" href="SoupServer.html#SoupClientContext"><span class="type">SoupClientContext</span></a> *client</code></em>);</pre>
<p>
Checks whether the request associated with <em class="parameter"><code>client</code></em> has been
authenticated, and if so returns the username that the client
authenticated as.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
<td>a <a class="link" href="SoupServer.html#SoupClientContext"><span class="type">SoupClientContext</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the authenticated-as user, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the request
was not authenticated.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-server-add-auth-domain"></a><h3>soup_server_add_auth_domain ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_server_add_auth_domain         (<em class="parameter"><code><a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a> *server</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupAuthDomain.html" title="SoupAuthDomain"><span class="type">SoupAuthDomain</span></a> *auth_domain</code></em>);</pre>
<p>
Adds an authentication domain to <em class="parameter"><code>server</code></em>. Each auth domain will
have the chance to require authentication for each request that
comes in; normally auth domains will require authentication for
requests on certain paths that they have been set up to watch, or
that meet other criteria set by the caller. If an auth domain
determines that a request requires authentication (and the request
doesn't contain authentication), <em class="parameter"><code>server</code></em> will automatically reject
the request with an appropriate status (401 Unauthorized or 407
Proxy Authentication Required). If the request used the
"100-continue" Expectation, <em class="parameter"><code>server</code></em> will reject it before the
request body is sent.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>server</code></em> :</span></p></td>
<td>a <a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>auth_domain</code></em> :</span></p></td>
<td>a <a class="link" href="SoupAuthDomain.html" title="SoupAuthDomain"><span class="type">SoupAuthDomain</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-server-remove-auth-domain"></a><h3>soup_server_remove_auth_domain ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_server_remove_auth_domain      (<em class="parameter"><code><a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a> *server</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupAuthDomain.html" title="SoupAuthDomain"><span class="type">SoupAuthDomain</span></a> *auth_domain</code></em>);</pre>
<p>
Removes <em class="parameter"><code>auth_domain</code></em> from <em class="parameter"><code>server</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>server</code></em> :</span></p></td>
<td>a <a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>auth_domain</code></em> :</span></p></td>
<td>a <a class="link" href="SoupAuthDomain.html" title="SoupAuthDomain"><span class="type">SoupAuthDomain</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-server-pause-message"></a><h3>soup_server_pause_message ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_server_pause_message           (<em class="parameter"><code><a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a> *server</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a> *msg</code></em>);</pre>
<p>
Pauses I/O on <em class="parameter"><code>msg</code></em>. This can be used when you need to return from
the server handler without having the full response ready yet. Use
<a class="link" href="SoupServer.html#soup-server-unpause-message" title="soup_server_unpause_message ()"><code class="function">soup_server_unpause_message()</code></a> to resume I/O.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>server</code></em> :</span></p></td>
<td>a <a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a> associated with <em class="parameter"><code>server</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-server-unpause-message"></a><h3>soup_server_unpause_message ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_server_unpause_message         (<em class="parameter"><code><a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a> *server</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a> *msg</code></em>);</pre>
<p>
Resumes I/O on <em class="parameter"><code>msg</code></em>. Use this to resume after calling
<a class="link" href="SoupServer.html#soup-server-pause-message" title="soup_server_pause_message ()"><code class="function">soup_server_pause_message()</code></a>, or after adding a new chunk to a
chunked response.
</p>
<p>
I/O won't actually resume until you return to the main loop.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>server</code></em> :</span></p></td>
<td>a <a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a> associated with <em class="parameter"><code>server</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-SERVER-PORT:CAPS"></a><h3>SOUP_SERVER_PORT</h3>
<pre class="programlisting">#define SOUP_SERVER_PORT            "port"
</pre>
<p>
Alias for the <a class="link" href="SoupServer.html#SoupServer--port" title='The "port" property'><span class="type">"port"</span></a> property. (The port the
server listens on.)
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-SERVER-INTERFACE:CAPS"></a><h3>SOUP_SERVER_INTERFACE</h3>
<pre class="programlisting">#define SOUP_SERVER_INTERFACE       "interface"
</pre>
<p>
Alias for the <a class="link" href="SoupServer.html#SoupServer--interface" title='The "interface" property'><span class="type">"interface"</span></a> property. (The address
of the network interface the server listens on.)
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-SERVER-SSL-CERT-FILE:CAPS"></a><h3>SOUP_SERVER_SSL_CERT_FILE</h3>
<pre class="programlisting">#define SOUP_SERVER_SSL_CERT_FILE   "ssl-cert-file"
</pre>
<p>
Alias for the <a class="link" href="SoupServer.html#SoupServer--ssl-cert-file" title='The "ssl-cert-file" property'><span class="type">"ssl-cert-file"</span></a> property, qv.
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-SERVER-SSL-KEY-FILE:CAPS"></a><h3>SOUP_SERVER_SSL_KEY_FILE</h3>
<pre class="programlisting">#define SOUP_SERVER_SSL_KEY_FILE    "ssl-key-file"
</pre>
<p>
Alias for the <a class="link" href="SoupServer.html#SoupServer--ssl-key-file" title='The "ssl-key-file" property'><span class="type">"ssl-key-file"</span></a> property, qv.
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-SERVER-TLS-CERTIFICATE:CAPS"></a><h3>SOUP_SERVER_TLS_CERTIFICATE</h3>
<pre class="programlisting">#define SOUP_SERVER_TLS_CERTIFICATE "tls-certificate"
</pre>
<p>
Alias for the <a class="link" href="SoupServer.html#SoupServer--tls-certificate" title='The "tls-certificate" property'><span class="type">"tls-certificate"</span></a> property, qv.
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-SERVER-ASYNC-CONTEXT:CAPS"></a><h3>SOUP_SERVER_ASYNC_CONTEXT</h3>
<pre class="programlisting">#define SOUP_SERVER_ASYNC_CONTEXT   "async-context"
</pre>
<p>
Alias for the <a class="link" href="SoupServer.html#SoupServer--async-context" title='The "async-context" property'><span class="type">"async-context"</span></a> property. (The
server's <a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a>.)
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-SERVER-RAW-PATHS:CAPS"></a><h3>SOUP_SERVER_RAW_PATHS</h3>
<pre class="programlisting">#define SOUP_SERVER_RAW_PATHS       "raw-paths"
</pre>
<p>
Alias for the <a class="link" href="SoupServer.html#SoupServer--raw-paths" title='The "raw-paths" property'><span class="type">"raw-paths"</span></a> property. (If <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>,
percent-encoding in the Request-URI path will not be
automatically decoded.)
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-SERVER-SERVER-HEADER:CAPS"></a><h3>SOUP_SERVER_SERVER_HEADER</h3>
<pre class="programlisting">#define SOUP_SERVER_SERVER_HEADER   "server-header"
</pre>
<p>
Alias for the <a class="link" href="SoupServer.html#SoupServer--server-header" title='The "server-header" property'><span class="type">"server-header"</span></a> property, qv.
</p>
</div>
</div>
<div class="refsect1">
<a name="SoupServer.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="SoupServer--async-context"></a><h3>The <code class="literal">"async-context"</code> property</h3>
<pre class="programlisting">  "async-context"            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>              : Read / Write / Construct Only</pre>
<p>The GMainContext to dispatch async I/O in.</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupServer--interface"></a><h3>The <code class="literal">"interface"</code> property</h3>
<pre class="programlisting">  "interface"                <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a>*          : Read / Write / Construct Only</pre>
<p>Address of interface to listen on.</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupServer--port"></a><h3>The <code class="literal">"port"</code> property</h3>
<pre class="programlisting">  "port"                     <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read / Write / Construct Only</pre>
<p>Port to listen on.</p>
<p>Allowed values: &lt;= 65536</p>
<p>Default value: 0</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupServer--raw-paths"></a><h3>The <code class="literal">"raw-paths"</code> property</h3>
<pre class="programlisting">  "raw-paths"                <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct Only</pre>
<p>If %TRUE, percent-encoding in the Request-URI path will not be automatically decoded.</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupServer--server-header"></a><h3>The <code class="literal">"server-header"</code> property</h3>
<pre class="programlisting">  "server-header"            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct</pre>
<p>
If non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the value to use for the "Server" header on
<a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a>s processed by this server.
</p>
<p>
The Server header is the server equivalent of the
User-Agent header, and provides information about the
server and its components. It contains a list of one or
more product tokens, separated by whitespace, with the most
significant product token coming first. The tokens must be
brief, ASCII, and mostly alphanumeric (although "-", "_",
and "." are also allowed), and may optionally include a "/"
followed by a version string. You may also put comments,
enclosed in parentheses, between or after the tokens.
</p>
<p>
Some HTTP server implementations intentionally do not use
version numbers in their Server header, so that
installations running older versions of the server don't
end up advertising their vulnerability to specific security
holes.
</p>
<p>
As with <a class="link" href="SoupSession.html#SoupSession--user-agent" title='The "user-agent" property'><span class="type">"user_agent"</span></a>, if you set a
<a class="link" href="SoupServer.html#SoupServer--server-header" title='The "server-header" property'><span class="type">"server_header"</span></a> property that has trailing whitespace,
<a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a> will append its own product token (eg,
"<code class="literal">libsoup/2.3.2</code>") to the end of the
header for you.
</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupServer--ssl-cert-file"></a><h3>The <code class="literal">"ssl-cert-file"</code> property</h3>
<pre class="programlisting">  "ssl-cert-file"            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct Only</pre>
<p>
Path to a file containing a PEM-encoded certificate. If
this and <a class="link" href="SoupServer.html#SoupServer--ssl-key-file" title='The "ssl-key-file" property'><span class="type">"ssl-key-file"</span></a> are both set, then the
server will speak https rather than plain http.
</p>
<p>
Alternatively, you can use <a class="link" href="SoupServer.html#SoupServer--tls-certificate" title='The "tls-certificate" property'><span class="type">"tls-certificate"</span></a>
to provide an arbitrary <a href="http://library.gnome.org/devel/gio/unstable/GTlsCertificate.html"><span class="type">GTlsCertificate</span></a>.
</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupServer--ssl-key-file"></a><h3>The <code class="literal">"ssl-key-file"</code> property</h3>
<pre class="programlisting">  "ssl-key-file"             <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct Only</pre>
<p>
Path to a file containing a PEM-encoded private key. If
this and <a class="link" href="SoupServer.html#SoupServer--ssl-key-file" title='The "ssl-key-file" property'><span class="type">"ssl-key-file"</span></a> are both set, then the
server will speak https rather than plain http. Note that
you are allowed to set them to the same value, if you have
a single file containing both the certificate and the key.
</p>
<p>
Alternatively, you can use <a class="link" href="SoupServer.html#SoupServer--tls-certificate" title='The "tls-certificate" property'><span class="type">"tls-certificate"</span></a>
to provide an arbitrary <a href="http://library.gnome.org/devel/gio/unstable/GTlsCertificate.html"><span class="type">GTlsCertificate</span></a>.
</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupServer--tls-certificate"></a><h3>The <code class="literal">"tls-certificate"</code> property</h3>
<pre class="programlisting">  "tls-certificate"          <a href="http://library.gnome.org/devel/gio/unstable/GTlsCertificate.html"><span class="type">GTlsCertificate</span></a>*      : Read / Write / Construct Only</pre>
<p>
A <a href="http://library.gnome.org/devel/gio/unstable/GTlsCertificate.html"><span class="type">GTlsCertificate</span></a> that has a <a href="http://library.gnome.org/devel/gio/unstable/GTlsCertificate.html#GTlsCertificate--private-key"><span class="type">"private-key"</span></a>
set. If this is set, then the server will speak https
rather than plain http.
</p>
<p>
Alternatively, you can use <a class="link" href="SoupServer.html#SoupServer--ssl-cert-file" title='The "ssl-cert-file" property'><span class="type">"ssl-cert-file"</span></a> and
<a class="link" href="SoupServer.html#SoupServer--ssl-key-file" title='The "ssl-key-file" property'><span class="type">"ssl-key-file"</span></a> properties, to have <a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a>
read in a a certificate from a file.
</p>
</div>
</div>
<div class="refsect1">
<a name="SoupServer.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="SoupServer-request-aborted"></a><h3>The <code class="literal">"request-aborted"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a>        *server,
                                                        <a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a>       *message,
                                                        <a class="link" href="SoupServer.html#SoupClientContext"><span class="type">SoupClientContext</span></a> *client,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>           user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a></pre>
<p>
Emitted when processing has failed for a message; this
could mean either that it could not be read (if
<a class="link" href="SoupServer.html#SoupServer-request-read" title='The "request-read" signal'><span class="type">"request_read"</span></a> has not been emitted for it yet),
or that the response could not be written back (if
<a class="link" href="SoupServer.html#SoupServer-request-read" title='The "request-read" signal'><span class="type">"request_read"</span></a> has been emitted but
<a class="link" href="SoupServer.html#SoupServer-request-finished" title='The "request-finished" signal'><span class="type">"request_finished"</span></a> has not been).
</p>
<p>
<em class="parameter"><code>message</code></em> is in an undefined state when this signal is
emitted; the signal exists primarily to allow the server to
free any state that it may have allocated in
<a class="link" href="SoupServer.html#SoupServer-request-started" title='The "request-started" signal'><span class="type">"request_started"</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>server</code></em> :</span></p></td>
<td>the server</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>message</code></em> :</span></p></td>
<td>the message</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
<td>the client context</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="SoupServer-request-finished"></a><h3>The <code class="literal">"request-finished"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a>        *server,
                                                        <a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a>       *message,
                                                        <a class="link" href="SoupServer.html#SoupClientContext"><span class="type">SoupClientContext</span></a> *client,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>           user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a></pre>
<p>
Emitted when the server has finished writing a response to
a request.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>server</code></em> :</span></p></td>
<td>the server</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>message</code></em> :</span></p></td>
<td>the message</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
<td>the client context</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="SoupServer-request-read"></a><h3>The <code class="literal">"request-read"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a>        *server,
                                                        <a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a>       *message,
                                                        <a class="link" href="SoupServer.html#SoupClientContext"><span class="type">SoupClientContext</span></a> *client,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>           user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a></pre>
<p>
Emitted when the server has successfully read a request.
<em class="parameter"><code>message</code></em> will have all of its request-side information
filled in, and if the message was authenticated, <em class="parameter"><code>client</code></em>
will have information about that. This signal is emitted
before any handlers are called for the message, and if it
sets the message's <span class="type">status_code</span>, then normal handler
processing will be skipped.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>server</code></em> :</span></p></td>
<td>the server</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>message</code></em> :</span></p></td>
<td>the message</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
<td>the client context</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="SoupServer-request-started"></a><h3>The <code class="literal">"request-started"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a>        *server,
                                                        <a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a>       *message,
                                                        <a class="link" href="SoupServer.html#SoupClientContext"><span class="type">SoupClientContext</span></a> *client,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>           user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a></pre>
<p>
Emitted when the server has started reading a new request.
<em class="parameter"><code>message</code></em> will be completely blank; not even the
Request-Line will have been read yet. About the only thing
you can usefully do with it is connect to its signals.
</p>
<p>
If the request is read successfully, this will eventually
be followed by a <a class="link" href="SoupServer.html#SoupServer-request-read" title='The "request-read" signal'><span class="type">"request_read"</span></a> signal. If a
response is then sent, the request processing will end with
a <a class="link" href="SoupServer.html#SoupServer-request-finished" title='The "request-finished" signal'><span class="type">"request_finished"</span></a> signal. If a network error
occurs, the processing will instead end with
<a class="link" href="SoupServer.html#SoupServer-request-aborted" title='The "request-aborted" signal'><span class="type">"request_aborted"</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>server</code></em> :</span></p></td>
<td>the server</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>message</code></em> :</span></p></td>
<td>the new message</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
<td>the client context</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="SoupServer.see-also"></a><h2>See Also</h2>
<a class="link" href="SoupAuthDomain.html" title="SoupAuthDomain"><span class="type">SoupAuthDomain</span></a>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>